package cn.edu.scujcc;

import java.util.List;
import java.util.Optional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TouristSpotsService {
	@Autowired
	private TouristSpotsRepository repo;
	
	public List<TouristSpots> getAllComments(){
		List<TouristSpots> result = null;
		result = repo.findAll();
		return result;
	}
	
	public List<TouristSpots> getImages(){
		List<TouristSpots> result =null;
		result = repo.findAll();
		return result;
	}
	
	public TouristSpots getIntroduction(String id) {
		TouristSpots result = null;
		Optional<TouristSpots> op = repo.findById(id);
		return result;
	}
}
